<?php
require_once('Zend/Config/Xml.php');
require_once('Zend/Config/Ini.php');
require_once('Zend/Controller/Front.php');

 $main = Zend_Controller_Front::getInstance();
 $main->addModuleDirectory('../app_mvc');
 $main->setModuleControllerDirectoryName('controllers');
 
 
 
 /* Load mode from global section first to determine which part of config to load */
 $GLOBAL = new Zend_Config_Xml('../config/config.xml','global', true);
 $CONFIG = new Zend_Config_Xml('../config/config.xml', $GLOBAL->mode, true);
 $CONFIG->merge($GLOBAL);
 
if($GLOBAL->mode == 'production') {
	if (!$LANGUAGE = $CACHE->load('language')) {
		$LANGUAGE = new Zend_Config_Ini('../config/language.ini','production',true);
		$CACHE->save($LANGUAGE, 'language');
	}
} else {
	$LANGUAGE = new Zend_Config_Ini('../config/language.ini','production',true);
}
 Zend_Registry::set('config',$CONFIG);
 Zend_Registry::set('global',$GLOBAL);
 Zend_Registry::set('language',$LANGUAGE);
 
	/*Inayat Added content from here*/
	$TAL_NO_EXCEPTION = false;
	//include_once('../includes/functions.php');

	define('PATH_UPLOAD', 'Uploads/');
	
	/* VCASMO */
	define('PATH_UPLOAD_VCASMO', PATH_UPLOAD . 'vcasmo/slideshows/');
	define('PATH_UPLOAD_VCASMO_IMAGES', PATH_UPLOAD . 'vcasmo/images/');
	define('PATH_UPLOAD_VCASMO_THUMBNAILS', PATH_UPLOAD . 'vcasmo/thumbnails/');
	
	/* Video */
	define('PATH_UPLOAD_VIDEO', PATH_UPLOAD . 'casts/');
	define('PATH_UPLOAD_VIDEO_ORG', PATH_UPLOAD . 'org_casts/');
	define('PATH_UPLOAD_VIDEO_IMAGES', PATH_UPLOAD . 'casts_images/');
	
	/* Attachments */
	define('PATH_UPLOAD_ATTACHMENTS', PATH_UPLOAD . 'attachments/');
	define('PATH_UPLOAD_DOCVIEWER', PATH_UPLOAD . 'docviewer/');
	
	/* Groups */
	define('PATH_UPLOAD_GROUPS', PATH_UPLOAD . 'groups/');
	define('PATH_UPLOAD_GROUPS_PREVIEW', PATH_UPLOAD . 'groups_preview/');
	
	/* User profile pics */
	define('PATH_UPLOAD_USERPICS', PATH_UPLOAD . 'Userpics/');
	
	/* Partner Images */
	define('PATH_UPLOAD_PARTNER_IMAGES', PATH_UPLOAD . 'partner_images/');
	define("SERVER_ADDRESS", 'http://www.mywhitecoat.local');